﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>images</title>


    <!-- WinJSContrib.Core references -->
    <script src="../../../scripts/jquery-2.1.1.js"></script>
    <script src="../../../scripts/winjscontrib/jquery.mcnext.WinJS.js"></script>
    <script src="../../../scripts/winjscontrib/mcnext.ui.utils.js"></script>
    <script src="../../../scripts/winjscontrib/mcnext.ui.bindings.js"></script>

    <link href="images.css" rel="stylesheet" />
    <script src="images.js"></script>
</head>
<body>
    <div class="imagesSample fragment">
        <header aria-label="Header content" role="banner">
            <button class="win-backbutton" aria-label="Back" disabled type="button"></button>
            <h1 class="titlearea win-type-ellipsis">
                <span class="pagetitle">binding images</span>
            </h1>
            <div class="codelink" data-codepage="./pages/bindings/images/images"><span class="symbol">&#xE160;</span><span class="text">show me the code !</span></div>
        </header>
        <section class="desc-screen" aria-label="Main content" role="main">
            <div class="bloc-description">
                <p>You often have to bind your objects to images or background images.</p>
                <p>
                    We provide some bindings to help you show your images in enhanced ways
                </p>
            </div>
            <div class="bloc-content">
                <div class="split">
                    <div id="simpleImageBinding">
                        <p>
                            You could simply bind to an image tag.
                        </p>
                        <p>
                            <img class="picture small" data-win-bind="src : pic"/>
                        </p>                        
                        <p>
                            or use a custom binding for background images.
                        </p>
                        <div class="picture small" data-win-bind="img : pic MCNEXT.Bindings.toBgImage" style=""></div>
                    </div>
                    <div id="bgimage">
                        <p>
                            Click on the button bellow to bind to an image and background image. When picture is loaded,
                            the binding will add a "imageLoaded" class to the element. Use this class to put transition or animations
                            to your images.
                        </p>
                        <p><button data-page-action="bgImage">bind bg image</button></p>
                        <img class="picture animate" data-win-bind="src : pic MCNEXT.Bindings.toSmartBgImage" />
                        <div class="picture animate" data-win-bind="img : pic MCNEXT.Bindings.toSmartBgImage" style=""></div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</body>
</html>
